Integrand size = 32, antiderivative size = 78 \[ \int \csc ^4(c+d x) (a+a \sin (c+d x))^3 (A-A \sin (c+d x)) \, dx=-a^3 A x+\frac {a^3 A \text {arctanh}(\cos (c+d x))}{d}-\frac {a^3 A \cot (c+d x)}{d}-\frac {a^3 A \cot ^3(c+d x)}{3 d}-\frac {a^3 A \cot (c+d x) \csc (c+d x)}{d} \]
-a^3*A*x+a^3*A*arctanh(cos(d*x+c))/d-a^3*A*cot(d*x+c)/d-1/3*a^3*A*cot(d*x+ c)^3/d-a^3*A*cot(d*x+c)*csc(d*x+c)/d
Time = 0.54 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.81 \[ \int \csc ^4(c+d x) (a+a \sin (c+d x))^3 (A-A \sin (c+d x)) \, dx=-\frac {a^3 A \left (24 c+24 d x+8 \cot \left (\frac {1}{2} (c+d x)\right )+6 \csc ^2\left (\frac {1}{2} (c+d x)\right )-24 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+24 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-6 \sec ^2\left (\frac {1}{2} (c+d x)\right )-8 \csc ^3(c+d x) \sin ^4\left (\frac {1}{2} (c+d x)\right )+\frac {1}{2} \csc ^4\left (\frac {1}{2} (c+d x)\right ) \sin (c+d x)-8 \tan \left (\frac {1}{2} (c+d x)\right )\right )}{24 d} \]
-1/24*(a^3*A*(24*c + 24*d*x + 8*Cot[(c + d*x)/2] + 6*Csc[(c + d*x)/2]^2 - 24*Log[Cos[(c + d*x)/2]] + 24*Log[Sin[(c + d*x)/2]] - 6*Sec[(c + d*x)/2]^2 - 8*Csc[c + d*x]^3*Sin[(c + d*x)/2]^4 + (Csc[(c + d*x)/2]^4*Sin[c + d*x]) /2 - 8*Tan[(c + d*x)/2]))/d
Time = 0.33 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.094, Rules used = {3042, 3445, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \csc ^4(c+d x) (a \sin (c+d x)+a)^3 (A-A \sin (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a \sin (c+d x)+a)^3 (A-A \sin (c+d x))}{\sin (c+d x)^4}dx\) |
\(\Big \downarrow \) 3445 |
\(\displaystyle \int \left (a^3 A \csc ^4(c+d x)+2 a^3 A \csc ^3(c+d x)-2 a^3 A \csc (c+d x)-a^3 A\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^3 A \text {arctanh}(\cos (c+d x))}{d}-\frac {a^3 A \cot ^3(c+d x)}{3 d}-\frac {a^3 A \cot (c+d x)}{d}-\frac {a^3 A \cot (c+d x) \csc (c+d x)}{d}-a^3 A x\) |
-(a^3*A*x) + (a^3*A*ArcTanh[Cos[c + d*x]])/d - (a^3*A*Cot[c + d*x])/d - (a ^3*A*Cot[c + d*x]^3)/(3*d) - (a^3*A*Cot[c + d*x]*Csc[c + d*x])/d
3.3.31.3.1 Defintions of rubi rules used
Int[sin[(e_.) + (f_.)*(x_)]^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m _.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[ExpandTrig[si n[e + f*x]^n*(a + b*sin[e + f*x])^m*(A + B*sin[e + f*x]), x], x] /; FreeQ[{ a, b, e, f, A, B}, x] && EqQ[A*b + a*B, 0] && EqQ[a^2 - b^2, 0] && IntegerQ [m] && IntegerQ[n]
Time = 1.19 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.27
method | result | size |
parallelrisch | \(\frac {A \,a^{3} \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )-\left (\cot ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+6 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-6 \left (\cot ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-24 d x +9 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-9 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )-24 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{24 d}\) | \(99\) |
derivativedivides | \(\frac {-A \,a^{3} \left (d x +c \right )-2 A \,a^{3} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )+2 A \,a^{3} \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )+A \,a^{3} \left (-\frac {2}{3}-\frac {\left (\csc ^{2}\left (d x +c \right )\right )}{3}\right ) \cot \left (d x +c \right )}{d}\) | \(101\) |
default | \(\frac {-A \,a^{3} \left (d x +c \right )-2 A \,a^{3} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )+2 A \,a^{3} \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )+A \,a^{3} \left (-\frac {2}{3}-\frac {\left (\csc ^{2}\left (d x +c \right )\right )}{3}\right ) \cot \left (d x +c \right )}{d}\) | \(101\) |
risch | \(-a^{3} A x +\frac {2 A \,a^{3} \left (3 \,{\mathrm e}^{5 i \left (d x +c \right )}+6 i {\mathrm e}^{2 i \left (d x +c \right )}-2 i-3 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3}}+\frac {A \,a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}-\frac {A \,a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}\) | \(109\) |
norman | \(\frac {\frac {2 A \,a^{3} \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {A \,a^{3}}{24 d}+\frac {6 A \,a^{3} \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {11 A \,a^{3} \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {21 A \,a^{3} \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {A \,a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}-\frac {13 A \,a^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}-\frac {11 A \,a^{3} \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {7 A \,a^{3} \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {7 A \,a^{3} \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {11 A \,a^{3} \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {13 A \,a^{3} \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}+\frac {A \,a^{3} \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {A \,a^{3} \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}-a^{3} A x \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-4 a^{3} A x \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-6 a^{3} A x \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-4 a^{3} A x \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-a^{3} A x \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}-\frac {A \,a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) | \(406\) |
1/24*A*a^3*(tan(1/2*d*x+1/2*c)^3-cot(1/2*d*x+1/2*c)^3+6*tan(1/2*d*x+1/2*c) ^2-6*cot(1/2*d*x+1/2*c)^2-24*d*x+9*tan(1/2*d*x+1/2*c)-9*cot(1/2*d*x+1/2*c) -24*ln(tan(1/2*d*x+1/2*c)))/d
Leaf count of result is larger than twice the leaf count of optimal. 175 vs. \(2 (76) = 152\).
Time = 0.29 (sec) , antiderivative size = 175, normalized size of antiderivative = 2.24 \[ \int \csc ^4(c+d x) (a+a \sin (c+d x))^3 (A-A \sin (c+d x)) \, dx=-\frac {4 \, A a^{3} \cos \left (d x + c\right )^{3} - 6 \, A a^{3} \cos \left (d x + c\right ) - 3 \, {\left (A a^{3} \cos \left (d x + c\right )^{2} - A a^{3}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 3 \, {\left (A a^{3} \cos \left (d x + c\right )^{2} - A a^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 6 \, {\left (A a^{3} d x \cos \left (d x + c\right )^{2} - A a^{3} d x - A a^{3} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{6 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )} \sin \left (d x + c\right )} \]
-1/6*(4*A*a^3*cos(d*x + c)^3 - 6*A*a^3*cos(d*x + c) - 3*(A*a^3*cos(d*x + c )^2 - A*a^3)*log(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) + 3*(A*a^3*cos(d*x + c)^2 - A*a^3)*log(-1/2*cos(d*x + c) + 1/2)*sin(d*x + c) + 6*(A*a^3*d*x*co s(d*x + c)^2 - A*a^3*d*x - A*a^3*cos(d*x + c))*sin(d*x + c))/((d*cos(d*x + c)^2 - d)*sin(d*x + c))
\[ \int \csc ^4(c+d x) (a+a \sin (c+d x))^3 (A-A \sin (c+d x)) \, dx=- A a^{3} \left (\int \left (- 2 \sin {\left (c + d x \right )} \csc ^{4}{\left (c + d x \right )}\right )\, dx + \int 2 \sin ^{3}{\left (c + d x \right )} \csc ^{4}{\left (c + d x \right )}\, dx + \int \sin ^{4}{\left (c + d x \right )} \csc ^{4}{\left (c + d x \right )}\, dx + \int \left (- \csc ^{4}{\left (c + d x \right )}\right )\, dx\right ) \]
-A*a**3*(Integral(-2*sin(c + d*x)*csc(c + d*x)**4, x) + Integral(2*sin(c + d*x)**3*csc(c + d*x)**4, x) + Integral(sin(c + d*x)**4*csc(c + d*x)**4, x ) + Integral(-csc(c + d*x)**4, x))
Time = 0.25 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.50 \[ \int \csc ^4(c+d x) (a+a \sin (c+d x))^3 (A-A \sin (c+d x)) \, dx=-\frac {6 \, {\left (d x + c\right )} A a^{3} - 3 \, A a^{3} {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 6 \, A a^{3} {\left (\log \left (\cos \left (d x + c\right ) + 1\right ) - \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + \frac {2 \, {\left (3 \, \tan \left (d x + c\right )^{2} + 1\right )} A a^{3}}{\tan \left (d x + c\right )^{3}}}{6 \, d} \]
-1/6*(6*(d*x + c)*A*a^3 - 3*A*a^3*(2*cos(d*x + c)/(cos(d*x + c)^2 - 1) - l og(cos(d*x + c) + 1) + log(cos(d*x + c) - 1)) - 6*A*a^3*(log(cos(d*x + c) + 1) - log(cos(d*x + c) - 1)) + 2*(3*tan(d*x + c)^2 + 1)*A*a^3/tan(d*x + c )^3)/d
Time = 0.31 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.92 \[ \int \csc ^4(c+d x) (a+a \sin (c+d x))^3 (A-A \sin (c+d x)) \, dx=\frac {A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 24 \, {\left (d x + c\right )} A a^{3} - 24 \, A a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 9 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {44 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 9 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 6 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - A a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}}}{24 \, d} \]
1/24*(A*a^3*tan(1/2*d*x + 1/2*c)^3 + 6*A*a^3*tan(1/2*d*x + 1/2*c)^2 - 24*( d*x + c)*A*a^3 - 24*A*a^3*log(abs(tan(1/2*d*x + 1/2*c))) + 9*A*a^3*tan(1/2 *d*x + 1/2*c) + (44*A*a^3*tan(1/2*d*x + 1/2*c)^3 - 9*A*a^3*tan(1/2*d*x + 1 /2*c)^2 - 6*A*a^3*tan(1/2*d*x + 1/2*c) - A*a^3)/tan(1/2*d*x + 1/2*c)^3)/d
Time = 13.97 (sec) , antiderivative size = 245, normalized size of antiderivative = 3.14 \[ \int \csc ^4(c+d x) (a+a \sin (c+d x))^3 (A-A \sin (c+d x)) \, dx=-\frac {\frac {A\,a^3\,\sin \left (2\,c+2\,d\,x\right )}{2}-\frac {A\,a^3\,\cos \left (3\,c+3\,d\,x\right )}{6}+\frac {A\,a^3\,\cos \left (c+d\,x\right )}{2}-\frac {A\,a^3\,\sin \left (3\,c+3\,d\,x\right )\,\mathrm {atan}\left (\frac {\sqrt {2}\,\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,\cos \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d\,x}{2}\right )}\right )}{2}+\frac {3\,A\,a^3\,\sin \left (c+d\,x\right )\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{4}+\frac {3\,A\,a^3\,\sin \left (c+d\,x\right )\,\mathrm {atan}\left (\frac {\sqrt {2}\,\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,\cos \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d\,x}{2}\right )}\right )}{2}-\frac {A\,a^3\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,\sin \left (3\,c+3\,d\,x\right )}{4}}{\frac {3\,d\,\sin \left (c+d\,x\right )}{4}-\frac {d\,\sin \left (3\,c+3\,d\,x\right )}{4}} \]
-((A*a^3*sin(2*c + 2*d*x))/2 - (A*a^3*cos(3*c + 3*d*x))/6 + (A*a^3*cos(c + d*x))/2 - (A*a^3*sin(3*c + 3*d*x)*atan((2^(1/2)*(cos(c/2 + (d*x)/2) + sin (c/2 + (d*x)/2)))/(2*cos(c/2 + pi/4 + (d*x)/2))))/2 + (3*A*a^3*sin(c + d*x )*log(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/4 + (3*A*a^3*sin(c + d*x)*at an((2^(1/2)*(cos(c/2 + (d*x)/2) + sin(c/2 + (d*x)/2)))/(2*cos(c/2 + pi/4 + (d*x)/2))))/2 - (A*a^3*log(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))*sin(3*c + 3*d*x))/4)/((3*d*sin(c + d*x))/4 - (d*sin(3*c + 3*d*x))/4)